<section class="layout" id="wx_message-list">
  <hl-page-header title="消息配置" class="mb-10"></hl-page-header>
  <section class="br-4 wx_message-list-container global_table" style="border:1px solid #E5E5E5">
    <div class="clearfix border-b global_table_title">
      <div class="item item-1">序</div>
      <div class="item item-2">消息名称</div>
      <div class="item item-3">消息分类</div>
      <div class="item item-4">渠道</div>
      <div class="item item-5">消息状态</div>
      <div class="item item-6">发送对象</div>
      <div class="item item-7 border-l">操作</div>
    </div>
    <div>
      <ul class="clearfix wx_message-list-item global_table_item" v-for="(item,index) in messageList" :id="item.id">
        <li class="item item-1">{{index + 1
          < 10 ? '0' + (index + 1) : index + 1 }}</li>
            <li class="item item-2">{{item.name | formatUndefined}}</li>
            <li class="item item-3">{{item.category == 'BL'?'账单':'工作流'}}</li>
            <li class="item item-4">{{item.channel == 'WX'?'微信':'钉钉'}}</li>
            <li class="item item-5">{{item.valid == 'Y'?'启用':'停用'}}</li>
            <li class="item item-6">{{item.type == 'O'?'客户':'员工'}}</li>
            <li class="item item-7 border-l">
              <a href="javascript:;" :id="item.id" @click="changeValid(item.id,'N')" v-if="item.valid == 'Y' && (permissions.indexOf('c106') > -1)">
                    停用
                  </a>
              <a href="javascript:;" :id="item.id" @click="changeValid(item.id,'Y')" v-if="item.valid == 'N' && (permissions.indexOf('c106') > -1)">
                    启用
                  </a>
              <a href="javascript:;" :id="item.id" @click="config(item.id)" v-if="(permissions.indexOf('c107') > -1)">
                    配置
                  </a>
                  <a href="javascript:;" v-if="!(permissions.indexOf('c107') > -1) && !(permissions.indexOf('c106') > -1)">--</a>
            </li>
      </ul>
    </div>
  </section>
</section>
<script src="modules/wx_message/scripts/message_list.js" charset="utf-8"></script>
